package com.softlook.mt.server.db.dto;

import java.lang.Integer;
import java.lang.String;
import com.softlook.mt.server.db.dto.Client;
import com.softlook.mt.server.db.dto.Devicegroup;
import java.util.List;
import java.util.LinkedList;
import java.lang.Object;

public class Device {
	private Integer deviceid;
	private String imei;
	private Integer clientid;
	private Integer devicegroupid;
	private String name;
	private Client clientidClientRefObj = null;
	private Devicegroup devicegroupidDevicegroupRefObj = null;
	private List deviceidUserdeviceRefList = new LinkedList();
	private List deviceidDeviceeventRefList = new LinkedList();
	public Integer getDeviceid() {
		return this.deviceid;
	}
	public void setDeviceid(Integer deviceid) {
		this.deviceid = deviceid;
	}
	public String getImei() {
		return this.imei;
	}
	public void setImei(String imei) {
		this.imei = imei;
	}
	public Integer getClientid() {
		return this.clientid;
	}
	public void setClientid(Integer clientid) {
		this.clientid = clientid;
	}
	public Integer getDevicegroupid() {
		return this.devicegroupid;
	}
	public void setDevicegroupid(Integer devicegroupid) {
		this.devicegroupid = devicegroupid;
	}
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public static boolean hasColumn(String column) {
		if(column.toUpperCase().equals("deviceid".toUpperCase())){
		   return true;
		}
		if(column.toUpperCase().equals("imei".toUpperCase())){
		   return true;
		}
		if(column.toUpperCase().equals("clientid".toUpperCase())){
		   return true;
		}
		if(column.toUpperCase().equals("devicegroupid".toUpperCase())){
		   return true;
		}
		if(column.toUpperCase().equals("name".toUpperCase())){
		   return true;
		}
		return false;
	}
	public boolean equals(Object object) {
		if(!(object instanceof Device)){
			return false;
		}
		
		Device table = (Device)object;
		if(this.deviceid == null &&  table.deviceid != null){
		   return false;
		}
		if(this.deviceid != null &&  table.deviceid == null){
		   return false;
		}
		if(this.deviceid != null && !this.deviceid.equals(table.deviceid)){
		   return false;
		}
		if(this.imei == null &&  table.imei != null){
		   return false;
		}
		if(this.imei != null &&  table.imei == null){
		   return false;
		}
		if(this.imei != null && !this.imei.equals(table.imei)){
		   return false;
		}
		if(this.clientid == null &&  table.clientid != null){
		   return false;
		}
		if(this.clientid != null &&  table.clientid == null){
		   return false;
		}
		if(this.clientid != null && !this.clientid.equals(table.clientid)){
		   return false;
		}
		if(this.devicegroupid == null &&  table.devicegroupid != null){
		   return false;
		}
		if(this.devicegroupid != null &&  table.devicegroupid == null){
		   return false;
		}
		if(this.devicegroupid != null && !this.devicegroupid.equals(table.devicegroupid)){
		   return false;
		}
		if(this.name == null &&  table.name != null){
		   return false;
		}
		if(this.name != null &&  table.name == null){
		   return false;
		}
		if(this.name != null && !this.name.equals(table.name)){
		   return false;
		}
		return true;
	}
	public Client getClientidClientRefObj() {
		return this.clientidClientRefObj;
	}
	public void setClientidClientRefObj(Client clientidClientRefObj) {
		this.clientidClientRefObj = clientidClientRefObj;
	}
	public Devicegroup getDevicegroupidDevicegroupRefObj() {
		return this.devicegroupidDevicegroupRefObj;
	}
	public void setDevicegroupidDevicegroupRefObj(Devicegroup devicegroupidDevicegroupRefObj) {
		this.devicegroupidDevicegroupRefObj = devicegroupidDevicegroupRefObj;
	}
	public List getDeviceidUserdeviceRefList() {
		return this.deviceidUserdeviceRefList;
	}
	public void setDeviceidUserdeviceRefList(List deviceidUserdeviceRefList) {
		this.deviceidUserdeviceRefList = deviceidUserdeviceRefList;
	}
	public List getDeviceidDeviceeventRefList() {
		return this.deviceidDeviceeventRefList;
	}
	public void setDeviceidDeviceeventRefList(List deviceidDeviceeventRefList) {
		this.deviceidDeviceeventRefList = deviceidDeviceeventRefList;
	}
}
